<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Berry™ Company Manage System</title>
    <link rel="stylesheet" href="/static/plugins/bootstrap-3.4.1-dist/css/bootstrap.css">
    <link rel="stylesheet" href="/static/css/manage_table.css">

    <style>
        .sidebar {
            height: 100%;
            width: 200px;
            position: fixed;
            top: 0;
            left: 0;
            background-color: #f0f0f0;
            padding-top: 20px;
        }

        .sidebar a {
            display: block;
            padding: 10px;
            text-decoration: none;
            color: black;
        }

        .sidebar a:hover {
            background-color: #d3d3d3;
        }

        .management-content {
            margin-left: 220px;
            padding: 20px;
            display: none;
        }
    </style>
</head>
<body>
<div class="sidebar container">
    <a href="#" id="product-link" class="btn btn-lg btn-primary btn-block">产品管理</a>
    <a href="#" id="news-link" class="btn btn-lg btn-primary btn-block">新闻管理</a>
    <a href="#" id="research-link" class="btn btn-lg btn-primary btn-block">研究管理</a>
    <a href="#" id="job-link" class="btn btn-lg btn-primary btn-block">招聘管理</a>
</div>

<div id="product-edit" class="management-content">
    <div id="product-manage"></div>
    <button id="add-product" class="btn btn-lg btn-primary btn-block">新增产品</button>
    <form id="product-form" style="display:none;">
        <input type="text" id="product-name" placeholder="产品名称" class="form-control">
        <input type="text" id="product-classify" placeholder="产品分类" class="form-control">
        <input type="text" id="product-img" placeholder="产品图片URL" class="form-control">
        <input type="text" id="product-detail" placeholder="产品详情" class="form-control">
        <button type="button" id="submit-product" class="btn btn-lg btn-success btn-block">确认新增</button>
    </form>
</div>

<div id="news-edit" class="management-content">
    <div id="news-manage"></div>
    <button id="add-news" class="btn btn-lg btn-primary btn-block">新增新闻</button>
    <form id="news-form" style="display:none;">
        <input type="text" id="news-title" placeholder="新闻标题" class="form-control">
        <textarea id="news-content" placeholder="新闻内容" class="form-control"></textarea>
        <input type="text" id="news-img" placeholder="新闻图片URL" class="form-control">
        <select id="news-type" class="form-control">
            <option value="0">新闻</option>
            <option value="1">活动</option>
            <option value="2">公告</option>
        </select>
        <button type="button" id="submit-news" class="btn btn-lg btn-success btn-block">确认新增</button>
    </form>
</div>

<div id="research-edit" class="management-content">
    <div id="research-manage"></div>
    <button id="add-research" class="btn btn-lg btn-primary btn-block">新增研究</button>
    <form id="research-form" style="display:none;">
        <input type="text" id="research-name" placeholder="研究名称" class="form-control">
        <input type="text" id="research-device_info" placeholder="设备信息" class="form-control">
        <input type="text" id="research-achievement" placeholder="研究成就" class="form-control">
        <input type="text" id="research-partner" placeholder="合作伙伴" class="form-control">
        <button type="button" id="submit-research" class="btn btn-lg btn-success btn-block">确认新增</button>
    </form>
</div>

<div id="job-edit" class="management-content">
    <div id="job-manage"></div>
    <button id="add-job" class="btn btn-lg btn-primary btn-block">新增岗位</button>
    <form id="job-form" style="display:none;">
        <input type="text" id="job-name" placeholder="岗位名称" class="form-control">
        <input type="text" id="job-describe" placeholder="岗位描述" class="form-control">
        <input type="text" id="job-require" placeholder="岗位要求" class="form-control">
        <input type="text" id="job-welfare" placeholder="岗位福利" class="form-control">
        <input type="text" id="job-mode" placeholder="工作模式" class="form-control">
        <button type="button" id="submit-job" class="btn btn-lg btn-success btn-block">确认新增</button>
    </form>
</div>

<script src="/static/js/product_manage.js"></script>

<script src="/static/js/news_manage.js"></script>

<script src="/static/js/research_manage.js"></script>

<script src="/static/js/job_manage.js"></script>
<script>
    function showContent(contentId) {
        var contents = document.getElementsByClassName('management-content');
        for (var i = 0; i < contents.length; i++) {
            contents[i].style.display = 'none';
        }
        document.getElementById(contentId).style.display = 'block';
    }
</script>

</body>
</html>
